<?php

namespace Trawind\Shares\Transformers;

use League\Fractal\TransformerAbstract;
use Trawind\Remotes\Repositories\Account\Account\ChannelRepositoryEloquent;
use Trawind\Remotes\Repositories\Account\Account\CompanyRepositoryEloquent;
use Trawind\Remotes\Repositories\Account\Account\DepartmentRepositoryEloquent;
use Trawind\Remotes\Repositories\Inventory\Locations\LocationsRepositoryEloquent;
use Trawind\Remotes\Repositories\User\UserRepositoryEloquent;
use Trawind\Shares\Models\Shares;

/**
 * Class LanguageTransformer.
 *
 * @package namespace TrawindCloud\Transformers;
 */
class SharesTransformer extends TransformerAbstract
{
    /**
     * Transform the Language entity.
     *
     * @param Shares $model
     *
     * @return array
     */
    public function transform(Shares $model)
    {
        return [
            'id' => (int) $model->id,
            'external_id' => $model->external_id,
            'business_type' => $model->business_type,
            'business_id' => (int) $model->business_id,
            'organization_type_id' => (int) $model->organization_type_id,
            'organization_id' => (int) $model->organization_id,
            'parent_subsidiary_id' => (int) $model->parent_subsidiary_id,
            'parent_subsidiary' => $model->parent_subsidiary,
            'origin_business_type_id' => (int)$model->origin_business_type_id,
            'origin_business_id' => (int)$model->origin_business_id,
            'status_type_id' => (int)$model->status_type_id,
            'subsidiary_id' => (int)$model->subsidiary_id,
            'subsidiary' => $model->subsidiary,
            'department_id' => (int)$model->department_id,
            'department' => $model->department,
            'location_id' => (int)$model->location_id,
            'location' => $model->location,
            'channel_id' => (int)$model->channel_id,
            'channel' => $model->channel,
            'user_id' => (int)$model->user_id,
            'user' => $model->user,
            'created_at' =>  __date_time($model->created_at),
            'updated_at' => __date_time($model->updated_at)
        ];
    }

}
